1. Field of the Invention
The present invention relates to image processing apparatuses and particularly to coding of image signals.
2. Description of the Related Art
The Moving Picture Experts Group (MPEG) standard and the H.264 (or MPEG4-advanced video coding (AVC)) standard are known as technical standards for coding image signals. These coding standards use techniques, such as discrete cosine transform (DCT), quantization, and variable length coding, and combine intraframe coding and interframe predictive coding to achieve coding of moving image signals.
Also, for example, the MPEG2 standard defines a video buffer verifier (VBV) buffer model (i.e., virtual buffer model) to ensure real-time processing during decoding. In the VBV buffer model, the amount of data in a buffer memory during decoding must be maintained at a level between the upper limit of the VBV buffer size and zero byte. For example, at main profile at main level (MP@ML), the maximum buffer size is specified at 1835008 bits.
A known technique for maintaining such a VBV buffer model is to estimate the filling level of a VBV buffer on the basis of the amount of codes generated per unit time, and thus control a quantization step width (i.e., Q-scale).
In a known MPEG coding technique, an index called “activity” indicating the feature value (i.e., complexity) of an image is used to weight a quantization step, and thus to improve image quality (e.g., see Japanese Patent Laid-Open No. 10-224786 corresponding to U.S. patent application Publication No. 2005/0147162).
However, if the quantization step is weighted using the activity of an image without reference to the amount of codes actually generated, the amount of generated codes may vary and an underflow of coded data may occur.